package com.example;

import com.dao.IMylog;
import com.model.MyLog;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;

public class siyetest {
    @Autowired
    IMylog iMylog;

    @org.springframework.scheduling.annotation.Scheduled(fixedRate = 10000)
    public void run(){
        MyLog myLog = new MyLog("198.333.333.333",1,new Date(),"自动插入");
        iMylog.addMyLog(myLog);
    }

    @org.springframework.scheduling.annotation.Scheduled(fixedRate = 5000)
    public void run1(){
        System.out.println(iMylog.());
    }

    @org.springframework.scheduling.annotation.Scheduled(fixedRate = 5000)
    public void run2(){
        System.out.println(iMylog.getNew10());
    }
}
